package ua.kharkiv.karimov.knure.SummaryTask1.Airplanes;

public class Airport {
	private Coord coord;
	private String name;

	public Airport(Coord coord, String name) throws Exception {
		this.coord = coord;
		setName(name);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) throws Exception {
		if (name.equals(""))
			throw new Exception("name cann't be empty");
		this.name = name;
	}

	public Coord getCoord() {
		return coord;
	}

	public void setCoord(Coord coord) {
		this.coord = coord;
	}

	@Override
	public String toString() {
		return name;
	}
}
